using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using NTTHAO.Web.BL.CommonPage;
using NTTHAO.CommonWeb;

public partial class Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            CommonSite site = NTTHAO.CommonWeb.WebGlobal.GetSite();
            if (site == null)
            {
                Response.Write("An error occurred while loading the website. Please contact to <a href=\"mailto:support.web@giovangvn.vn\">support.web@transcom.vn</a> about that.");
                return;
            }

            string control = "Sites/" + site.SiteID + "/Default.ascx";
            //string control = "Sites/Vigor/Default.ascx";
            Control ctrl = LoadControl(control);
            this.Controls.Add(ctrl);
        }
        catch (Exception ex) { Response.Write(ex.Message + "<br /><br />" + ex.StackTrace + "<br /><br />" + ex.Source); }
    }

    public bool IsMobileRequest
    {
        get
        {
            return Request.Browser.IsMobileDevice;
        }
    }
}
